<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <base href="<%=basePath%>">
    <title>添加活动</title>
    <%@include file="../common_css.jsp"%>
    <%@include file="../common_js.jsp"%>
</head>
<body>
<form action="/activity/update" method="post">


    <input name="id" type="hidden" value="${activity.id}"/>

    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label">活动名称</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input " name="name" id="name" placeholder="请输入活动名称" value="${activity.name}">
        </div>
    </div>
    <br>
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label">地点</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input "
                   name="place" id="place"
                   placeholder="请输入地点" value="${activity.place}">
        </div>
    </div>
    <br>

    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label">开始时间</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input "
                   name="startTime" id="startTime"
                   placeholder="请输入开始时间" value="${activity.startTime}">
        </div>
    </div>

    <br>
    <br>
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label">结束时间</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input "
                   name="endTime" id="endTime"
                   placeholder="请输入结束时间" value="${activity.endTime}">
        </div>
    </div>

</form>

<script>
    layui.use('laydate', function(){
        var laydate = layui.laydate;
        //执行一个laydate实例
        laydate.render({
            elem: '#startTime', //指定元素
            type: 'datetime'
        });

        //执行一个laydate实例
        laydate.render({
            elem: '#endTime', //指定元素,
            type: 'datetime'
        });
    });


</script>
</body>
</html>
